package com.lcm.jnode.controller.admin;

import java.util.List;

import com.google.common.collect.Lists;
import com.jfinal.aop.Before;
import com.jfinal.core.Controller;
import com.lcm.jnode.interceptor.AdminInterceptor;
import com.lcm.jnode.model.Tags;

/**
 * 博文标签
 * @author L.cm
 * @date 2013-5-29 下午11:31:43
 */
@Before(AdminInterceptor.class)
public class AdminTagsController extends Controller {

	/**
	 * 
	 * @param     设定文件
	 * @return void    返回类型
	 * @throws
	 */
	public void all() {
		List<Tags> tagsList = Tags.dao.find("SELECT t.tag_name FROM l_tags t");
		List<String> jsonList = Lists.newArrayList();
		for (Tags tags : tagsList) {
			jsonList.add(tags.getStr(Tags.TAG_NAME));
		}
		renderJson(jsonList);
	}
}
